package com.game.framework.manager.core;

import akka.actor.AbstractActor;
import cn.hutool.extra.spring.SpringUtil;
import com.game.dao.core.GameDao;
import com.game.dao.user.UserPlayInfoDao;
import com.game.dao.user.account.UserAccountDao;
import com.game.dao.user.roles.RolesDao;
import com.game.framework.SpringManager;
import com.game.logic.fighting.attrs.AttrsManagement;
import com.game.logic.fighting.skill.skill.RolesSkillsEventHandler;

/// 继承该类，可以访问数据库
public abstract class ActorDaoAble extends AbstractActor {
    protected static final AttrsManagement attrsManagement = SpringUtil.getBean(AttrsManagement.class);

    // ------ handler
    protected static final RolesSkillsEventHandler ROLES_SKILLS = SpringUtil.getBean(RolesSkillsEventHandler.class);

    // ------

    // ------ dao
    protected static final GameDao gameDao = SpringManager.getInstance().getBean(GameDao.class);
    protected static final RolesDao rolesDao = SpringManager.getInstance().getBean(RolesDao.class);
    protected static final UserAccountDao userAccountDao = SpringManager.getInstance().getBean(UserAccountDao.class);
    protected static final UserPlayInfoDao userPlayInfoDao = SpringManager.getInstance().getBean(UserPlayInfoDao.class);
}
